let Local: any = {
    标题名称: {
        zh: "串口服务器配置系统",
        en: "Serial ports server configuration system"
    },
    测试: {
        zh: "测试",
        en: "Test"
    },
    下载配置文件: {
        zh: "下载配置文件",
        en: "Download the configuration file"
    },
    恢复出厂设置: {
        en: "Restore factory setting"
    },
    DNS错误: { en: "DNS ERROR" },
    确认恢复出厂设置吗:
        {
            en: "Are you sure to restore factory setting?"
        },
    上传文件
        : {
            zh: "上传文件",
            en: "Upload file"
        },
    配置处理: {
        zh: "配置处理",
        en: "CfgFile"
    },
    上传本地备份的配置文件: { en: "Upload a local backup configuration file." },
    上传升级文件: { en: "Upload new firmware file" },
    系统升级: { en: "Update System" },
    应用tp: {
        zh: "保存设置并重启设备",
        en: "Save the Settings and restart the server program"
    },
    应用: {
        zh: "应用",
        en: "Apply"
    },
    串口服务器配置: {
        zh: "串口服务器配置",
        en: "Serial Ports Server Configuration"
    },
    串口号: {
        en: "Serial Port"
    },
    参数设置: {
        en: " Parameter Setting"
    },
    启用: {
        en: "Enable"
    },
    批量设置: {
        en: "Batch Set"
    },
    提醒: {
        en: "Info"
    },
    确定: {
        en: "OK"
    },
    加载中: {
        zh: "加载中...",
        en: "Loading..."
    },
    警告: {
        en: "Warning"
    },
    保存配置成功: {
        en: "Save Configuration Success"
    },
    modbustcp: {
        zh: "ModeBusTCP转ModBus[UTC]",
        en: "ModeBusTCP To ModBus[UTC]"
    },
    波特率: {
        en: "Baudrate"
    },
    数据位: {
        en: "Databits"
    },
    停止位: {
        en: "Stopbits"
    },
    校验位: {
        en: "Paritybit"
    },
    最大包长度: {
        en: "Maximum package length"
    },
    自适应波特率: {
        zh: "同步波特率[RFC2217]",
        en: "Synchronous Baudrate[RFC2217]"
    },
    心跳包: {
        en: "Heart Beat"
    },
    定时发送心跳包: {
        en: "Send heartbeat packages regularly"
    },
    心跳包时间间隔: {
        en: "Interval"
    },
    心跳包标识: {
        en: "Identification"
    },
    轮询时间: {
        h: "轮询时间(ms)",
        en: "Polling Time Interval"
    },
    用户名: {
        en: "UserName"
    },
    密码: {
        en: "Password"
    },
    静态: {
        en: "Static"
    },
    IP获取方式: {
        en: "IP Get Method"
    },
    登录: {
        en: "Login"
    },
    记住密码: {
        en: "Remember password"
    },
    验证出现异常: {
        en: "Verify occurrence exception"
    },
    请输入正确的数值: {
        zh: "请输入正确的数值，不能超过99999999",
        en: "Please enter the correct values"
    },
    请输入正确的标识: {
        zh: "请输入正确的标识 例如: FF FF  不能超过5个字节",
        en: "Please enter the correct identification for example : FF FF"
    },
    请输入正确的IP: {
        zh: "请输入正确的IP",
        en: "Please enter the correct IP"
    },
    请输入正确的子网掩码: {
        zh: "请输入正确的子网掩码",
        en: "Please enter the correct Mask"
    },
    设备重启中: {
        zh: "设备重启中,请稍后...",
        en: "Restarting...  Please Wait a moment "
    },
    用户名或密码错误: {
        zh: "用户名或密码错误",
        en: "Username or password error"
    },
    请输入正确的网关: {
        zh: "请输入正确的网关",
        en: "Please enter the correct Gateway"
    },
    请输入正确的MAC: {
        zh: "请输入正确的MAC",
        en: "Please enter the correct MAC"
    },
    两包之间最小时间差: {
        zh: "两包之间最小时间差(ms)",
        en: "The minimum time difference between two data packets(ms)"
    },

    端口范围: {
        zh: "端口范围: 100-65535",
        en: "端口范围: 100-65535"
    },

    本地端口: {
        zh: "本地端口",
        en: "Local port"
    },
    本地端口tp: {
        zh: "此设备socket通讯要使用的端口号,输入0表示使用随机端口,tcpserver模式不能为0",
        en: "The port number to use for this device socket communication, input 0 represents " +
            "the use of a random port, and the tcpserver mode cannot be 0"
    },
    编辑: {

        en: "Edit"
    },
    禁用: {

        en: "Disable"
    },
    删除: {

        en: "Del"
    },
    添加: {

        en: "Add"
    },
    服务: {

        en: "Server"
    },
    取消: {

        en: "Cancel"
    },
    保存: {

        en: "Save"
    },
    全部: {

        en: "All"
    },
    服务类型: {

        en: "Service type"
    },
    网口选择: {

        en: "NetPort"
    },
    目的IP地址: {

        en: "Destination IP address"
    },
    目的端口: {

        en: "Destination port"
    },
    配置网络服务: {

        en: "Configure network services"
    },
    系统配置: {

        en: "System Configuration"
    },
    设备信息设置: {

        en: "Equipment Information"
    },
    网口参数设置: {

        en: "NetPort Setting"
    },
    网口设置: {
        en: "NetPort Setting"
    },
    SH命令: {
        en: "SH Command"
    },
    重启: {
        en: "Reboot"
    },
    串口配置: {
        en: "Serial Configuration"
    },
    设备名称: {
        en: "Equipment Name"
    },
    IP地址: {
        en: "IP Address"
    },
    子网掩码: {
        en: "Mask"
    },
    修改MAC: {
        en: "Modify the MAC"
    },
    网口: {
        en: "Net Port"
    },
    网关: {
        en: "Gateway"
    },
    修改: {
        en: "Modification"
    },
    执行命令出错: {
        en: "Error:"
    },
    输入命令: {
        zh: "输入命令...",
        en: "Input Command..."
    },
    运行结果: {
        zh: "运行结果 :",
        en: "Result :"
    },
    确认重启设备吗: {
        zh: "确认重启设备吗?",
        en: "are you sure you want to restart device?"
    },
    保存配置信息出错: {
        zh: "保存配置信息出错: ",
        en: "Error Information: "
    },
    确定删除: {
        zh: "确定要删除此服务吗?",
        en: "Are you sure you want to delete this service? "
    }


};
//默认语言
export let LocalType: string = "zh";
export function SetLocalType(lang: string) {
    LocalType = lang;
}
export function GetLocal(name?: string): string {
    try {
        var values: any = Local[name];
        if (values[LocalType] != undefined) {
            return values[LocalType];
        } else if (values["zh"] != undefined) {
            return values[LocalType];
        } else {
            return name;
        }
    } catch (error) {
        return name;
    }

}
export interface MyEvent { //通用事件处理
    (msg: any, cmd?: string, ...arg: any[]): void;
}

export interface MyMessageEvent {

    (source: React.Component<Myprops, any>, TorefName?: string, cmd?: string, obj?: any, ...arg: any[]): void;
}
export interface Myprops {
    //名称
    displayName?: string;
    //事件处理回调函数
    OnMessageSendEvent?: MyMessageEvent;
    //OnMessageReceiveEvent?:MyMessageEvent;
}